import request from '@/config/axios'

export interface LegalAdviceClueVO {
        id: number
        clueName: string
        userId: number
        userMobile: string
        userRealName: string
        clueDesc: string
        clueLevel: number
        remark: string
        clueUpdateTime: Date
        distributeStatus: number
        distributeTenant: number
}

// 查询法律咨询线索列表
export const getLegalAdviceCluePage = async (params) => {
    return await request.get({url: `/ad/legal-advice-clue/page`, params})
}

// 查询法律咨询线索详情
export const getLegalAdviceClue = async (id: number) => {
    return await request.get({url: `/ad/legal-advice-clue/get?id=` + id})
}

// 新增法律咨询线索
export const createLegalAdviceClue = async (data: LegalAdviceClueVO) => {
    return await request.post({url: `/ad/legal-advice-clue/create`, data})
}

// 修改法律咨询线索
export const updateLegalAdviceClue = async (data: LegalAdviceClueVO) => {
    return await request.put({url: `/ad/legal-advice-clue/update`, data})
}

// 删除法律咨询线索
export const deleteLegalAdviceClue = async (id: number) => {
    return await request.delete({url: `/ad/legal-advice-clue/delete?id=` + id})
}

// 导出法律咨询线索 Excel
export const exportLegalAdviceClue = async (params) => {
    return await request.download({url: `/ad/legal-advice-clue/export-excel`, params})
}